#!/bin/bash
nginxurl=/opt/openresty/nginx
. $nginxurl/scripts/golo.conf
cd $ASLAM_WS_PATH/auto_driving_perception/lidar_slam/yaml
aslam_method=$( cat method.yaml |grep self_align_method |awk -F ":" '{print $2}'|awk -F "#" '{print $1}')
if [ $aslam_method != "2d" ];then
	sudo sed -i "s/$aslam_method/ 2d /g" $ASLAM_WS_PATH/auto_driving_perception/lidar_slam/yaml/method.yaml
fi
sudo systemctl stop  aslamS.service;rosnode kill /mapping_node;echo y |rosnode cleanup;sudo systemctl restart aslamM.service
